package com.effectiv.panchoo.controller;

import javax.annotation.PostConstruct;

import lombok.extern.slf4j.Slf4j;


import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.effectiv.panchoo.domain.User;

@Slf4j
@RestController
@RequestMapping(value =  "/user", consumes = {"application/json"})
public class UserController {

	@RequestMapping(method=RequestMethod.POST)
	public User save(@RequestBody User user) {
		log.info("Saving user = {}", user);
		
		return user;
	}
	
	@PostConstruct
	public void init(){
		log.info("------------- INIT USER CONTROLLER -------------");
	}
}
